Integrand size = 28, antiderivative size = 354 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\frac {\left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right ) x}{4 a^2 (c-i d)^3 (c+i d)^5}-\frac {2 d^3 \left (5 c^2-5 i c d-2 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (i c-d)^5 (i c+d)^3 f}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c-i d) (c+i d)^3 f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))} \]
[Out]
Time = 0.87 (sec) , antiderivative size = 354, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {3640, 3677, 3610, 3612, 3611} \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\frac {d (c-3 i d) \left (c^2+8 i c d+5 d^2\right )}{4 a^2 f (c-i d)^2 (c+i d)^4 (c+d \tan (e+f x))}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 f (c-i d) (c+i d)^3 (c+d \tan (e+f x))^2}-\frac {2 d^3 \left (5 c^2-5 i c d-2 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 f (-d+i c)^5 (d+i c)^3}+\frac {x \left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right )}{4 a^2 (c-i d)^3 (c+i d)^5}+\frac {-5 d+i c}{4 a^2 f (c+i d)^2 (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 f (-d+i c) (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2} \]
[In]
[Out]
Rule 3610
Rule 3611
Rule 3612
Rule 3640
Rule 3677
Rubi steps \begin{align*} \text {integral}& = -\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {\int \frac {-2 a (i c-3 d)-4 i a d \tan (e+f x)}{(a+i a \tan (e+f x)) (c+d \tan (e+f x))^3} \, dx}{4 a^2 (i c-d)} \\ & = \frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {\int \frac {-2 a^2 \left (c^2+5 i c d-16 d^2\right )-6 a^2 (c+5 i d) d \tan (e+f x)}{(c+d \tan (e+f x))^3} \, dx}{8 a^4 (c+i d)^2} \\ & = \frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {\int \frac {-2 a^2 \left (c^3+5 i c^2 d-13 c d^2+15 i d^3\right )-4 a^2 d \left (c^2+5 i c d+8 d^2\right ) \tan (e+f x)}{(c+d \tan (e+f x))^2} \, dx}{8 a^4 (c+i d)^2 \left (c^2+d^2\right )} \\ & = \frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))}-\frac {\int \frac {-2 a^2 \left (c^4+5 i c^3 d-11 c^2 d^2+25 i c d^3+16 d^4\right )-2 a^2 d \left (c^3+5 i c^2 d+29 c d^2-15 i d^3\right ) \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{8 a^4 (c+i d)^2 \left (c^2+d^2\right )^2} \\ & = \frac {\left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^3}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))}-\frac {\left (2 d^3 \left (5 c^2-5 i c d-2 d^2\right )\right ) \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{a^2 (c+i d)^2 \left (c^2+d^2\right )^3} \\ & = \frac {\left (c^5+5 i c^4 d-10 c^3 d^2+30 i c^2 d^3+45 c d^4-15 i d^5\right ) x}{4 a^2 (c+i d)^2 \left (c^2+d^2\right )^3}-\frac {2 d^3 \left (5 c^2-5 i c d-2 d^2\right ) \log (c \cos (e+f x)+d \sin (e+f x))}{a^2 (c+i d)^2 \left (c^2+d^2\right )^3 f}+\frac {d \left (c^2+5 i c d+8 d^2\right )}{4 a^2 (c+i d)^2 \left (c^2+d^2\right ) f (c+d \tan (e+f x))^2}+\frac {i c-5 d}{4 a^2 (c+i d)^2 f (1+i \tan (e+f x)) (c+d \tan (e+f x))^2}-\frac {1}{4 (i c-d) f (a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^2}+\frac {(c-3 i d) d \left (c^2+8 i c d+5 d^2\right )}{4 a^2 (c-i d)^2 (c+i d)^4 f (c+d \tan (e+f x))} \\ \end{align*}
Time = 6.84 (sec) , antiderivative size = 336, normalized size of antiderivative = 0.95 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=-\frac {\frac {2 i (c+i d)}{(-i+\tan (e+f x))^2 (c+d \tan (e+f x))^2}-\frac {2 (c+5 i d)}{(-i+\tan (e+f x)) (c+d \tan (e+f x))^2}-6 (c+5 i d) \left (-\frac {i \log (i-\tan (e+f x))}{2 (c+i d)^2}+\frac {i \log (i+\tan (e+f x))}{2 (c-i d)^2}+\frac {d \left (2 c \log (c+d \tan (e+f x))-\frac {c^2+d^2}{c+d \tan (e+f x)}\right )}{\left (c^2+d^2\right )^2}\right )+2 \left (c^2+5 i c d+8 d^2\right ) \left (\frac {\log (i-\tan (e+f x))}{(-i c+d)^3}+\frac {\log (i+\tan (e+f x))}{(i c+d)^3}+\frac {d \left (\left (6 c^2-2 d^2\right ) \log (c+d \tan (e+f x))-\frac {\left (c^2+d^2\right ) \left (5 c^2+d^2+4 c d \tan (e+f x)\right )}{(c+d \tan (e+f x))^2}\right )}{\left (c^2+d^2\right )^3}\right )}{8 a^2 (c+i d)^2 f} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 833 vs. \(2 (324 ) = 648\).
Time = 1.33 (sec) , antiderivative size = 834, normalized size of antiderivative = 2.36
method | result | size |
derivativedivides | \(\frac {2 i c d}{f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )}-\frac {i c^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {4 d^{3} c^{3}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}-\frac {4 d^{5} c}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2}}{16 f \,a^{2} \left (i d +c \right )^{5}}+\frac {10 d^{3} \ln \left (c +d \tan \left (f x +e \right )\right ) c^{2}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5}}-\frac {4 d^{5} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5}}-\frac {d^{3} c^{4}}{2 f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )^{2}}-\frac {d^{5} c^{2}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )^{2}}-\frac {d^{7}}{2 f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )^{2}}+\frac {31 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{2}}{16 f \,a^{2} \left (i d +c \right )^{5}}+\frac {2 i d^{6}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}+\frac {c d}{2 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {10 i d^{4} \ln \left (c +d \tan \left (f x +e \right )\right ) c}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5}}+\frac {2 i d^{4} c^{2}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c d}{2 f \,a^{2} \left (i d +c \right )^{5}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c^{2}}{8 f \,a^{2} \left (i d +c \right )^{5}}-\frac {31 \arctan \left (\tan \left (f x +e \right )\right ) d^{2}}{8 f \,a^{2} \left (i d +c \right )^{5}}+\frac {i d^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {i \arctan \left (\tan \left (f x +e \right )\right ) c d}{f \,a^{2} \left (i d +c \right )^{5}}+\frac {c^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )}-\frac {7 d^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{16 f \,a^{2} \left (i d -c \right )^{3}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{2} \left (i d -c \right )^{3}}\) | \(834\) |
default | \(\frac {2 i c d}{f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )}-\frac {i c^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {4 d^{3} c^{3}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}-\frac {4 d^{5} c}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c^{2}}{16 f \,a^{2} \left (i d +c \right )^{5}}+\frac {10 d^{3} \ln \left (c +d \tan \left (f x +e \right )\right ) c^{2}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5}}-\frac {4 d^{5} \ln \left (c +d \tan \left (f x +e \right )\right )}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5}}-\frac {d^{3} c^{4}}{2 f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )^{2}}-\frac {d^{5} c^{2}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )^{2}}-\frac {d^{7}}{2 f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )^{2}}+\frac {31 i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) d^{2}}{16 f \,a^{2} \left (i d +c \right )^{5}}+\frac {2 i d^{6}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}+\frac {c d}{2 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}-\frac {10 i d^{4} \ln \left (c +d \tan \left (f x +e \right )\right ) c}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5}}+\frac {2 i d^{4} c^{2}}{f \,a^{2} \left (i d -c \right )^{3} \left (i d +c \right )^{5} \left (c +d \tan \left (f x +e \right )\right )}+\frac {\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) c d}{2 f \,a^{2} \left (i d +c \right )^{5}}+\frac {\arctan \left (\tan \left (f x +e \right )\right ) c^{2}}{8 f \,a^{2} \left (i d +c \right )^{5}}-\frac {31 \arctan \left (\tan \left (f x +e \right )\right ) d^{2}}{8 f \,a^{2} \left (i d +c \right )^{5}}+\frac {i d^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )^{2}}+\frac {i \arctan \left (\tan \left (f x +e \right )\right ) c d}{f \,a^{2} \left (i d +c \right )^{5}}+\frac {c^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )}-\frac {7 d^{2}}{4 f \,a^{2} \left (i d +c \right )^{5} \left (\tan \left (f x +e \right )-i\right )}-\frac {i \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{16 f \,a^{2} \left (i d -c \right )^{3}}-\frac {\arctan \left (\tan \left (f x +e \right )\right )}{8 f \,a^{2} \left (i d -c \right )^{3}}\) | \(834\) |
risch | \(-\frac {x}{4 a^{2} \left (3 i c^{2} d -i d^{3}-c^{3}+3 c \,d^{2}\right )}+\frac {i {\mathrm e}^{-2 i \left (f x +e \right )} c}{4 a^{2} \left (-i c +d \right )^{2} \left (-2 i c d -c^{2}+d^{2}\right ) f}-\frac {{\mathrm e}^{-2 i \left (f x +e \right )} d}{a^{2} \left (-i c +d \right )^{2} \left (-2 i c d -c^{2}+d^{2}\right ) f}+\frac {i {\mathrm e}^{-4 i \left (f x +e \right )}}{16 a^{2} \left (2 i c d +c^{2}-d^{2}\right ) \left (i d +c \right ) f}+\frac {20 d^{4} c x}{a^{2} \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}+\frac {20 d^{4} c e}{a^{2} f \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}+\frac {20 i d^{3} c^{2} x}{a^{2} \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}-\frac {8 i d^{5} x}{a^{2} \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}+\frac {20 i d^{3} c^{2} e}{a^{2} f \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}-\frac {8 i d^{5} e}{a^{2} f \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}-\frac {2 d^{4} \left (6 i c d \,{\mathrm e}^{2 i \left (f x +e \right )}-5 c^{2} {\mathrm e}^{2 i \left (f x +e \right )}+d^{2} {\mathrm e}^{2 i \left (f x +e \right )}-3 i c d -5 c^{2}-2 d^{2}\right )}{\left (-i c +d \right )^{4} \left ({\mathrm e}^{2 i \left (f x +e \right )} d +i c \,{\mathrm e}^{2 i \left (f x +e \right )}-d +i c \right )^{2} f \,a^{2} \left (i c +d \right )^{3}}+\frac {10 i d^{4} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c}{a^{2} f \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}-\frac {10 d^{3} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c^{2}}{a^{2} f \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}+\frac {4 d^{5} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{a^{2} f \left (2 i c^{7} d +6 i c^{5} d^{3}+6 i c^{3} d^{5}+2 i c \,d^{7}+c^{8}+2 c^{6} d^{2}-2 c^{2} d^{6}-d^{8}\right )}\) | \(1011\) |
norman | \(\text {Expression too large to display}\) | \(1498\) |
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 907 vs. \(2 (304) = 608\).
Time = 0.28 (sec) , antiderivative size = 907, normalized size of antiderivative = 2.56 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\frac {i \, c^{7} - c^{6} d + 3 i \, c^{5} d^{2} - 3 \, c^{4} d^{3} + 3 i \, c^{3} d^{4} - 3 \, c^{2} d^{5} + i \, c d^{6} - d^{7} + 4 \, {\left (c^{7} + 3 i \, c^{6} d - c^{5} d^{2} + 85 i \, c^{4} d^{3} + 235 \, c^{3} d^{4} - 271 i \, c^{2} d^{5} - 147 \, c d^{6} + 31 i \, d^{7}\right )} f x e^{\left (8 i \, f x + 8 i \, e\right )} - 4 \, {\left (-i \, c^{7} - 11 i \, c^{5} d^{2} - 20 \, c^{4} d^{3} + 45 i \, c^{3} d^{4} - 8 \, c^{2} d^{5} + 55 i \, c d^{6} + 12 \, d^{7} - 2 \, {\left (c^{7} + 5 i \, c^{6} d - 9 \, c^{5} d^{2} + 75 i \, c^{4} d^{3} + 75 \, c^{3} d^{4} + 39 i \, c^{2} d^{5} + 85 \, c d^{6} - 31 i \, d^{7}\right )} f x\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (9 i \, c^{7} - 13 \, c^{6} d + 71 i \, c^{5} d^{2} + 5 \, c^{4} d^{3} - 45 i \, c^{3} d^{4} + 305 \, c^{2} d^{5} + 85 i \, c d^{6} + 95 \, d^{7} + 4 \, {\left (c^{7} + 7 i \, c^{6} d - 21 \, c^{5} d^{2} + 45 i \, c^{4} d^{3} - 45 \, c^{3} d^{4} + 69 i \, c^{2} d^{5} - 23 \, c d^{6} + 31 i \, d^{7}\right )} f x\right )} e^{\left (4 i \, f x + 4 i \, e\right )} - 2 \, {\left (-3 i \, c^{7} + 7 \, c^{6} d - 9 i \, c^{5} d^{2} + 21 \, c^{4} d^{3} - 9 i \, c^{3} d^{4} + 21 \, c^{2} d^{5} - 3 i \, c d^{6} + 7 \, d^{7}\right )} e^{\left (2 i \, f x + 2 i \, e\right )} - 32 \, {\left ({\left (5 \, c^{4} d^{3} - 15 i \, c^{3} d^{4} - 17 \, c^{2} d^{5} + 9 i \, c d^{6} + 2 \, d^{7}\right )} e^{\left (8 i \, f x + 8 i \, e\right )} + 2 \, {\left (5 \, c^{4} d^{3} - 5 i \, c^{3} d^{4} + 3 \, c^{2} d^{5} - 5 i \, c d^{6} - 2 \, d^{7}\right )} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (5 \, c^{4} d^{3} + 5 i \, c^{3} d^{4} + 3 \, c^{2} d^{5} + i \, c d^{6} + 2 \, d^{7}\right )} e^{\left (4 i \, f x + 4 i \, e\right )}\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right )}{16 \, {\left ({\left (a^{2} c^{10} + 5 \, a^{2} c^{8} d^{2} + 10 \, a^{2} c^{6} d^{4} + 10 \, a^{2} c^{4} d^{6} + 5 \, a^{2} c^{2} d^{8} + a^{2} d^{10}\right )} f e^{\left (8 i \, f x + 8 i \, e\right )} + 2 \, {\left (a^{2} c^{10} + 2 i \, a^{2} c^{9} d + 3 \, a^{2} c^{8} d^{2} + 8 i \, a^{2} c^{7} d^{3} + 2 \, a^{2} c^{6} d^{4} + 12 i \, a^{2} c^{5} d^{5} - 2 \, a^{2} c^{4} d^{6} + 8 i \, a^{2} c^{3} d^{7} - 3 \, a^{2} c^{2} d^{8} + 2 i \, a^{2} c d^{9} - a^{2} d^{10}\right )} f e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (a^{2} c^{10} + 4 i \, a^{2} c^{9} d - 3 \, a^{2} c^{8} d^{2} + 8 i \, a^{2} c^{7} d^{3} - 14 \, a^{2} c^{6} d^{4} - 14 \, a^{2} c^{4} d^{6} - 8 i \, a^{2} c^{3} d^{7} - 3 \, a^{2} c^{2} d^{8} - 4 i \, a^{2} c d^{9} + a^{2} d^{10}\right )} f e^{\left (4 i \, f x + 4 i \, e\right )}\right )}} \]
[In]
[Out]
Time = 87.44 (sec) , antiderivative size = 1583, normalized size of antiderivative = 4.47 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\frac {x \left (c^{2} + 8 i c d - 31 d^{2}\right )}{4 a^{2} c^{5} + 20 i a^{2} c^{4} d - 40 a^{2} c^{3} d^{2} - 40 i a^{2} c^{2} d^{3} + 20 a^{2} c d^{4} + 4 i a^{2} d^{5}} + \frac {- 10 i c^{2} d^{4} + 6 c d^{5} - 4 i d^{6} + \left (- 10 i c^{2} d^{4} e^{2 i e} - 12 c d^{5} e^{2 i e} + 2 i d^{6} e^{2 i e}\right ) e^{2 i f x}}{a^{2} c^{9} f + 3 i a^{2} c^{8} d f + 8 i a^{2} c^{6} d^{3} f - 6 a^{2} c^{5} d^{4} f + 6 i a^{2} c^{4} d^{5} f - 8 a^{2} c^{3} d^{6} f - 3 a^{2} c d^{8} f - i a^{2} d^{9} f + \left (2 a^{2} c^{9} f e^{2 i e} + 2 i a^{2} c^{8} d f e^{2 i e} + 8 a^{2} c^{7} d^{2} f e^{2 i e} + 8 i a^{2} c^{6} d^{3} f e^{2 i e} + 12 a^{2} c^{5} d^{4} f e^{2 i e} + 12 i a^{2} c^{4} d^{5} f e^{2 i e} + 8 a^{2} c^{3} d^{6} f e^{2 i e} + 8 i a^{2} c^{2} d^{7} f e^{2 i e} + 2 a^{2} c d^{8} f e^{2 i e} + 2 i a^{2} d^{9} f e^{2 i e}\right ) e^{2 i f x} + \left (a^{2} c^{9} f e^{4 i e} - i a^{2} c^{8} d f e^{4 i e} + 4 a^{2} c^{7} d^{2} f e^{4 i e} - 4 i a^{2} c^{6} d^{3} f e^{4 i e} + 6 a^{2} c^{5} d^{4} f e^{4 i e} - 6 i a^{2} c^{4} d^{5} f e^{4 i e} + 4 a^{2} c^{3} d^{6} f e^{4 i e} - 4 i a^{2} c^{2} d^{7} f e^{4 i e} + a^{2} c d^{8} f e^{4 i e} - i a^{2} d^{9} f e^{4 i e}\right ) e^{4 i f x}} + \begin {cases} \frac {\left (4 i a^{2} c^{4} f e^{2 i e} - 16 a^{2} c^{3} d f e^{2 i e} - 24 i a^{2} c^{2} d^{2} f e^{2 i e} + 16 a^{2} c d^{3} f e^{2 i e} + 4 i a^{2} d^{4} f e^{2 i e}\right ) e^{- 4 i f x} + \left (16 i a^{2} c^{4} f e^{4 i e} - 112 a^{2} c^{3} d f e^{4 i e} - 240 i a^{2} c^{2} d^{2} f e^{4 i e} + 208 a^{2} c d^{3} f e^{4 i e} + 64 i a^{2} d^{4} f e^{4 i e}\right ) e^{- 2 i f x}}{64 a^{4} c^{7} f^{2} e^{6 i e} + 448 i a^{4} c^{6} d f^{2} e^{6 i e} - 1344 a^{4} c^{5} d^{2} f^{2} e^{6 i e} - 2240 i a^{4} c^{4} d^{3} f^{2} e^{6 i e} + 2240 a^{4} c^{3} d^{4} f^{2} e^{6 i e} + 1344 i a^{4} c^{2} d^{5} f^{2} e^{6 i e} - 448 a^{4} c d^{6} f^{2} e^{6 i e} - 64 i a^{4} d^{7} f^{2} e^{6 i e}} & \text {for}\: 64 a^{4} c^{7} f^{2} e^{6 i e} + 448 i a^{4} c^{6} d f^{2} e^{6 i e} - 1344 a^{4} c^{5} d^{2} f^{2} e^{6 i e} - 2240 i a^{4} c^{4} d^{3} f^{2} e^{6 i e} + 2240 a^{4} c^{3} d^{4} f^{2} e^{6 i e} + 1344 i a^{4} c^{2} d^{5} f^{2} e^{6 i e} - 448 a^{4} c d^{6} f^{2} e^{6 i e} - 64 i a^{4} d^{7} f^{2} e^{6 i e} \neq 0 \\x \left (- \frac {c^{2} + 8 i c d - 31 d^{2}}{4 a^{2} c^{5} + 20 i a^{2} c^{4} d - 40 a^{2} c^{3} d^{2} - 40 i a^{2} c^{2} d^{3} + 20 a^{2} c d^{4} + 4 i a^{2} d^{5}} + \frac {c^{2} e^{4 i e} + 2 c^{2} e^{2 i e} + c^{2} + 8 i c d e^{4 i e} + 10 i c d e^{2 i e} + 2 i c d - 31 d^{2} e^{4 i e} - 8 d^{2} e^{2 i e} - d^{2}}{4 a^{2} c^{5} e^{4 i e} + 20 i a^{2} c^{4} d e^{4 i e} - 40 a^{2} c^{3} d^{2} e^{4 i e} - 40 i a^{2} c^{2} d^{3} e^{4 i e} + 20 a^{2} c d^{4} e^{4 i e} + 4 i a^{2} d^{5} e^{4 i e}}\right ) & \text {otherwise} \end {cases} - \frac {2 d^{3} \cdot \left (5 c^{2} - 5 i c d - 2 d^{2}\right ) \log {\left (\frac {c + i d}{c e^{2 i e} - i d e^{2 i e}} + e^{2 i f x} \right )}}{a^{2} f \left (c - i d\right )^{3} \left (c + i d\right )^{5}} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\text {Exception raised: RuntimeError} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 772 vs. \(2 (304) = 608\).
Time = 0.81 (sec) , antiderivative size = 772, normalized size of antiderivative = 2.18 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\frac {\frac {16 \, {\left (5 i \, c^{2} d^{4} + 5 \, c d^{5} - 2 i \, d^{6}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{-i \, a^{2} c^{8} d + 2 \, a^{2} c^{7} d^{2} - 2 i \, a^{2} c^{6} d^{3} + 6 \, a^{2} c^{5} d^{4} + 6 \, a^{2} c^{3} d^{6} + 2 i \, a^{2} c^{2} d^{7} + 2 \, a^{2} c d^{8} + i \, a^{2} d^{9}} - \frac {{\left (i \, c^{2} - 8 \, c d - 31 i \, d^{2}\right )} \log \left (\tan \left (f x + e\right ) - i\right )}{a^{2} c^{5} + 5 i \, a^{2} c^{4} d - 10 \, a^{2} c^{3} d^{2} - 10 i \, a^{2} c^{2} d^{3} + 5 \, a^{2} c d^{4} + i \, a^{2} d^{5}} - \frac {16 \, \log \left (\tan \left (f x + e\right ) + i\right )}{16 i \, a^{2} c^{3} + 48 \, a^{2} c^{2} d - 48 i \, a^{2} c d^{2} - 16 \, a^{2} d^{3}} + \frac {16 \, {\left (3 \, c^{4} d^{2} \tan \left (f x + e\right )^{4} + 12 i \, c^{3} d^{3} \tan \left (f x + e\right )^{4} - 18 \, c^{2} d^{4} \tan \left (f x + e\right )^{4} - 12 i \, c d^{5} \tan \left (f x + e\right )^{4} + 3 \, d^{6} \tan \left (f x + e\right )^{4} + 6 \, c^{5} d \tan \left (f x + e\right )^{3} + 10 i \, c^{4} d^{2} \tan \left (f x + e\right )^{3} + 20 \, c^{3} d^{3} \tan \left (f x + e\right )^{3} - 260 i \, c^{2} d^{4} \tan \left (f x + e\right )^{3} - 370 \, c d^{5} \tan \left (f x + e\right )^{3} + 114 i \, d^{6} \tan \left (f x + e\right )^{3} + 3 \, c^{6} \tan \left (f x + e\right )^{2} - 16 i \, c^{5} d \tan \left (f x + e\right )^{2} + 75 \, c^{4} d^{2} \tan \left (f x + e\right )^{2} - 400 i \, c^{3} d^{3} \tan \left (f x + e\right )^{2} - 955 \, c^{2} d^{4} \tan \left (f x + e\right )^{2} + 720 i \, c d^{5} \tan \left (f x + e\right )^{2} + 173 \, d^{6} \tan \left (f x + e\right )^{2} - 14 i \, c^{6} \tan \left (f x + e\right ) + 18 \, c^{5} d \tan \left (f x + e\right ) - 164 i \, c^{4} d^{2} \tan \left (f x + e\right ) - 724 \, c^{3} d^{3} \tan \left (f x + e\right ) + 970 i \, c^{2} d^{4} \tan \left (f x + e\right ) + 410 \, c d^{5} \tan \left (f x + e\right ) - 32 i \, d^{6} \tan \left (f x + e\right ) - 19 \, c^{6} - 28 i \, c^{5} d - 126 \, c^{4} d^{2} + 332 i \, c^{3} d^{3} + 269 \, c^{2} d^{4} - 48 i \, c d^{5} + 16 \, d^{6}\right )}}{-64 \, {\left (i \, a^{2} c^{7} - a^{2} c^{6} d + 3 i \, a^{2} c^{5} d^{2} - 3 \, a^{2} c^{4} d^{3} + 3 i \, a^{2} c^{3} d^{4} - 3 \, a^{2} c^{2} d^{5} + i \, a^{2} c d^{6} - a^{2} d^{7}\right )} {\left (d \tan \left (f x + e\right )^{2} + c \tan \left (f x + e\right ) - i \, d \tan \left (f x + e\right ) - i \, c\right )}^{2}}}{8 \, f} \]
[In]
[Out]
Time = 13.46 (sec) , antiderivative size = 2640, normalized size of antiderivative = 7.46 \[ \int \frac {1}{(a+i a \tan (e+f x))^2 (c+d \tan (e+f x))^3} \, dx=\text {Too large to display} \]
[In]
[Out]